<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   
    <sx:head />
    <style type="text/css">
		.buttonC{text-align: left}
		.pagetable{font-size:12px;}
		
	</style>
    <style type="text/css">@import "css/rep.css";</style>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/rep.js"></script>
    <script type="text/javascript" src="js/repStyle.js"></script>
    <script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
    
   </head>
 业务单据列表
  <body>
   <s:form action="BusiAction" method="post" theme="simple">
     
   <table class="pagetable">
	   <tr>
	   		<td>
		   		日期:<sx:datetimepicker name="queryCrt.startDate" displayFormat="yyyy-MM-dd" />
		   		       至<sx:datetimepicker name="queryCrt.endDate" displayFormat="yyyy-MM-dd" />
	   		</td>
	   		<td>采热地点：<s:select label="选择采热地点" list="#session.company_list_suply"	name="queryCrt.fromComId" listKey="id" listValue="comName"
							headerKey="-1" headerValue="%{#queryCrt.fromComId}" emptyOption="false"/></td>
	   		<td>车辆：<s:select label="选择车辆" list="#session.car_list" name="queryCrt.carId" listKey="id" listValue="num" headerKey="-1"
							headerValue="%{#queryCrt.carId}" emptyOption="false" /></td>
	   	
	   		<td>系统编号：<s:textfield name="queryCrt.num"  style="width:70px;" /></td>
	   		<td>采热单号: <s:textfield name="queryCrt.heatNum" style="width:70px;" /></td>
	   		<td><s:submit value="查询" method="findallblist" onclick='setfistpage()' /><input type=button value="导出" onclick="Copy2Excel(myTable)"></td>
	   		
	   </tr>
   </table>
   
    <table id="myTable" class="tablesorter" >
 		<thead> 
	 		 <tr>
		         <th>ID</th>
		         <th>单据编号</th>
		          <th>采热日期</th>     		         
		          <th>采热地点</th>
		          <th>车牌</th>
		          
		          <th>采热单号</th>            
		         <th>采热成本</th>  
		                         
		         <th>采水单号</th>		        
		         <th>采水成本</th>
		         
		          <th>运输单号</th>
		          <th>运输费用</th>
		          
		          <th>销售单号</th>
		          <th>销售金额</th>
		          
		         
		         <th>误差吨位</th>
		         <th>备注</th>                           
		         <th></th>
	        
	        </tr>
        </thead>
        <tbody>  
		       <s:iterator id="bvlist" value="bvlist" >
		        <tr>
		         <td><s:property  value="id"/> </td>
		         <td><s:property  value="num"/> </td>
		          <td><s:date  name="heatDate" format="yyyy-MM-dd"/> </td>
		         
		          <td><s:property  value="heatComName"/> </td>
		          <td><s:property  value="heatCarName"/> </td>
		          
		           <td><s:property  value="heatNum"/> </td>
		         <td><s:property  value="heatSum"/> </td>     
		                    
		         <td><s:property  value="waterNum"/> </td>		                  
		         <td><s:property  value="waterSum"/> </td>
		         
		         <td><s:property  value="tranNum"/> </td>
		         <td><s:property  value="trfsum"/> </td>
		         
		          <td><s:property  value="sellNum"/> </td>
		         <td><s:property  value="sellsum"/> </td>
		         
		         <td><s:property  value="extAttr6"/> </td>
		         <td><s:property  value="remark"/> </td>
		                            
		         <td>
		           	<s:if test="%{sellSts.id==10}" >	
		          		<a href="BusiAction!findbyid.action?id=<s:property value="id"/>&appr=1&returnto=s_edit_one">编辑</a>
		          	</s:if>
		          	<s:else>
		          			<s:if test="%{sellStswater.id==10}" >	
		          				<a href="BusiAction!findbyid.action?id=<s:property value="id"/>&appr=1">编辑</a>
		          			</s:if>
		          	</s:else>
		          	<!-- 仅依据采热或采水的状态来判断是否可编辑,有一个为录入，可整单可编辑 -->
		         </td>
		        
		         <!--  <a href="Price34Action!delete?id=<s:property value="id"/>">删除</a> -->
		      
		        </tr>
		       </s:iterator>
        </tbody>
    </table>
       <!-----------------------分页部分---------------------------------------->
      
      
		<table width="850" border="0" class="pagetable">
			  	<tr>
			    	<td>　				
								
							当前第<s:property value="page"/> 页,共<s:property value="planNum"/>条记录, 共分<s:property value="totalPage"/>页
					
				<input type="hidden" name="maxNum" value="">
			    	<input type="hidden" name="page" id="page" value="<s:property value="page"/>">
			    		
						<s:submit value="首页" onclick='setfistpage()' method="findallblist"></s:submit>	
						<s:if test="page<=1">
						上一页
						</s:if>
						<s:else>
							<s:submit value="上一页" onclick='setlastpage(%{page})' method="findallblist"></s:submit>		
							
						</s:else>
								
						<s:if test="page>=totalPage">
						 下一页
						</s:if>
					    <s:else>
						<s:submit value="下一页"  onclick='setnextpage(%{page})' method="findallblist"></s:submit>	
				
					    </s:else>
						<s:submit value="尾页" onclick='settaltolpage(%{totalPage})' method="findallblist"></s:submit>	
						
						</td>
					
			</table>
        <!-----------------------分页部分---------------------------- -->
    </s:form>

  </body>
</html>
